<div class="users form register-block <?php echo !empty($this->data['User']['is_requested']) ? 'js-login-response ajax-login-block' : ''; ?>">
	<h2><?php echo __l('Login'); ?></h2>
	<?php if (!(!empty($this->params['prefix']) && $this->params['prefix'] == 'admin') && empty($this->data['User']['is_requested'])): ?>
    <div class="clearfix">
	<div class="openid-block multiple-logins clearfix">
        <h5><?php echo __l('Sign In using: '); ?></h5>
		<ul class="open-id-list clearfix">
			<li class="face-book">
				 <?php if(Configure::read('facebook.is_enabled_facebook_connect')):  ?>
					<?php echo $html->link(__l('Sign in with Facebook'), array('controller' => 'users', 'action' => 'login','type'=>'facebook'), array('title' => __l('Sign in with Facebook'), 'escape' => false)); ?>
				 <?php endif; ?>
			</li>
			<?php if(Configure::read('twitter.is_enabled_twitter_connect')):?>
				<li class="twiiter"><?php echo $html->link(__l('Sign in with Twitter'), array('controller' => 'users', 'action' => 'login',  'type'=> 'twitter', 'admin'=>false), array('class' => 'Twitter', 'title' => __l('Sign in with Twitter')));?></li>
			<?php endif;?>
				<li class="yahoo"><?php echo $html->link(__l('Sign in with Yahoo'), array('controller' => 'users', 'action' => 'login', 'type'=>'yahoo'), array('title' => __l('Sign in with Yahoo')));?></li>
				<li class="gmail"><?php echo $html->link(__l('Sign in with Gmail'), array('controller' => 'users', 'action' => 'login', 'type'=>'gmail'), array('title' => __l('Sign in with Gmail')));?></li>
				<li class="open-id"><?php 	echo $html->link(__l('Sign in with Open ID'), array('controller' => 'users', 'action' => 'login','type'=>'openid'), array('class'=>'','title' => __l('Sign in with Open ID')));?></li>
		</ul>
    </div>
    </div>
    <?php endif; ?>
	<?php
		$formClass = !empty($this->data['User']['is_requested']) ? 'js-ajax-login' : '';
		echo $form->create('User', array('action' => 'login', 'class' => 'normal '.$formClass));
		echo $form->input(Configure::read('user.using_to_login'));
		echo $form->input('passwd', array('label' => __l('Password')));
		if(!empty($this->data['User']['is_requested'])) {
			echo $form->input('is_requested', array('type' => 'hidden'));
		}
	?>
	<?php echo $form->input('User.is_remember', array('type' => 'checkbox', 'label' => __l('Remember me on this computer.'))); ?>
	<div class="fromleft">
		<?php echo $html->link(__l('Forgot your password?') , array('controller' => 'users', 'action' => 'forgot_password', 'admin' => false),array('title' => __l('Forgot your password?'))); ?>
		<?php if(!(!empty($this->params['prefix']) && $this->params['prefix'] == 'admin') && empty($this->data['User']['is_requested'])): ?> |
			<?php  echo $html->link(__l('Signup') , array('controller' => 'users',	'action' => 'register'),array('title' => __l('Signup'))); ?>
		<?php endif; ?>
	</div>
	<?php
		$f = (!empty($_GET['f'])) ? $_GET['f'] : ((!empty($this->data['User']['f'])) ? $this->data['User']['f'] : (($this->params['controller'] != 'users' && ($this->params['action'] != 'login' && $this->params['action'] != 'admin_login')) ? $this->params['url']['url'] : ''));
			if (!empty($f)):
				echo $form->input('f', array('type' => 'hidden', 'value' => $f));
			endif;
	?>
	<div class="submit-block clearfix">
		<?php echo $form->submit(__l('Login')); ?>
		<?php if(!empty($this->data['User']['is_requested']) && $this->data['User']['is_requested']):  ?>
			<div class="cancel-block js-cancel-block">
				<?php echo $html->link(__l('Cancel'), '#', array('title' => __l('Never Mind'),'class' => "cancel-button js-toggle-show {'container':'js-login-message', 'hide_container':'js-login-form'}"));?>
			</div>
		<?php endif; ?>
	</div>
	<?php echo $form->end(); ?>
</div>